<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>离乌人员信息登记</title>
    <meta charset="utf-8">



    <link href="../static/weiui/lib/weui.css" th:href="@{/weiui/lib/weui.css}" rel="stylesheet">
    <link href="../static/weiui/css/jquery-weui.css" th:href="@{/weiui/css/jquery-weui.css}" rel="stylesheet">
    <link href="../static/weiui/css/demos.css" th:href="@{/weiui/css/demos.css}" rel="stylesheet">

    <th:block th:include="include :: header('新增离乌申请数据')" />
    <th:block th:include="include :: datetimepicker-css" />

</head>

<body ontouchstart>

<div class="weui-tab">
    <div class="weui-tab__bd">
        <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">

            <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
                <form class="form-horizontal m" id="form-lwsq-add" style="padding-bottom: 35px">
                    <div class="form-group" style="text-align: center;font-size: 20px;font-weight: bold">
                        <span class="col-sm-12 ">离乌人员申请填报表</span>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">证件类型：</label>
                        <div class="col-sm-8">
                            <select name="zjlx" class="form-control m-b" style="color: blue" th:with="type=${@dict.getType('b_zjlx')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">证件号码：</label>
                        <div class="col-sm-8">
                            <input name="zjhm" class="form-control"placeholder="请输入您的证件号码(用于身份核验,请正确填写)" type="text" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">申请人姓名：</label>
                        <div class="col-sm-8">
                            <input name="xm" class="form-control"placeholder="请输入姓名" type="text" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">性别：</label>
                        <div class="col-sm-8">
                            <select name="xb" class="form-control m-b"style="color: blue" th:with="type=${@dict.getType('sys_user_sex')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">族别：</label>
                        <div class="col-sm-8">
                            <!--<input name="mz" class="form-control"placeholder="请输入您的民族" type="text" required>-->
                            <select name="mz" class="form-control m-b" th:with="type=${@dict.getType('b_ry_mz')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">年龄：</label>
                        <div class="col-sm-8">
                            <input name="by3" class="form-control"placeholder="请输入您的年龄"  type="text" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">人员类型：</label>
                        <div class="col-sm-8">
                            <select name="sfjn" class="form-control m-b"style="color: blue" th:with="type=${@dict.getType('sys_yes_no')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">联系方式：</label>
                        <div class="col-sm-8">
                            <input name="sjhm" class="form-control"placeholder="请输入您的手机号码" type="text" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">近3天是否有发热、咳嗽等症状：</label>
                        <div class="col-sm-8">
                            <select name="styc" class="form-control m-b"style="color: blue" th:with="type=${@dict.getType('sys_yes_no')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">入乌日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="rwrq" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">暂住所类型：</label>
                        <div class="col-sm-8">
                            <select name="zzslx" class="form-control m-b" th:with="type=${@dict.getType('b_zzslx')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">详细地址：</label>
                        <div class="col-sm-8">
                            <textarea name="xxdz" class="form-control"placeholder="如道路、门牌号、小区、楼栋号、单元室等" required></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required"> 请选择区县：</label>
                        <div class="col-sm-8">
                            <select id="province" class="form-control m-b" onchange="changeProvince(this.value)">
                                <option value=""></option>
                                <option value="达坂城区">达坂城区</option>
                                <option value="米东区">米东区</option>
                                <option value="沙依巴克区">沙依巴克区</option>
                                <option value="水磨沟区" >水磨沟区</option>
                                <option value="天山区" >天山区</option>
                                <option value="头屯河区" >头屯河区</option>
                                <option value="乌鲁木齐县" >乌鲁木齐县</option>
                                <option value="新市区" >新市区</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required"> 请选择街道：</label>
                        <div class="col-sm-8">
                            <input name="sqName" id="sqName" type="hidden"/>
                            <select id="citys"class="form-control m-b"></select>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-3 control-label">离乌方式：</label>
                        <div class="col-sm-8">
                            <select name="lwfs" class="form-control m-b"style="color: blue" th:with="type=${@dict.getType('b_jtfs')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">车牌号码：</label>
                        <div class="col-sm-8">
                            <input name="cphm" class="form-control"placeholder="请输入您的车牌号码,例:新A8888" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">预期离乌日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="yqlwrq" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">返程目的地：</label>
                        <div class="col-sm-8">
                            <input name="fcmdd" class="form-control"placeholder="请输入您的返程目的地" type="text" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">近期是否做过核酸检测：</label>
                        <div class="col-sm-8">
                            <select name="hsjc" class="form-control m-b"style="color: blue" th:with="type=${@dict.getType('sys_yes_no')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">核酸检测日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="hsjcRq" class="form-control" placeholder="yyyy-MM-dd" type="text">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">是否做过双抗检测：</label>
                        <div class="col-sm-8">
                            <select name="skjc" class="form-control m-b"style="color: blue" th:with="type=${@dict.getType('sys_yes_no')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">双抗检测日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="skjcRq" class="form-control" placeholder="yyyy-MM-dd" type="text">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="ck"  id="ck" type="checkbox" checked>本人承诺:以上所填写内容真实,完整,
                                如有虚假,由本人承担一切责任!
                            </div>
                        </div>
                    </div>




                    <div class="col-md-12">
                        <div class="form-group">
                            <div class="col-sm-12 " style="text-align: center;">
                                <button id="bottonsubmit" type="button" onclick="submitHandler()" class="btn btn-primary">提交</button>
                                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
                            </div>
                        </div>
                    </div>

                </form>
            </div>


        </div>
        <div id="tab2" class="weui-tab__bd-item">

            <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
                <form class="form-horizontal m" id="form-lwsq-likai" style="padding-bottom: 35px">
                    <div class="form-group" style="text-align: center;font-size: 16px;font-weight: bold">
                        <span class="col-sm-12 ">我要离开住所</span>
                    </div>

            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">离开人员手机号：</label>
                    <div class="col-sm-9">
                        <input type="text" name="sjhm" class="form-control" placeholder="请输入手机号码">
                    </div>
                </div>
            </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">离开时间：</label>
                            <div class="col-sm-9">
                                <div class="input-group date">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                    <input type="text" name="lkzs" class="form-control" id="laydate-demo-3" placeholder="yyyy-MM-dd HH:mm:ss">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <div class="col-sm-12 " style="text-align: center;">
                                <button disabled type="button" onclick="lksubmitHandler()" class="btn btn-primary">提交</button>
                                <button disabled onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
                            </div>
                        </div>
                    </div>

                </form>
            </div>
        </div>
        <div id="tab3" class="weui-tab__bd-item">
            <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
                <form class="form-horizontal m" id="form-lwsq-jichang" style="padding-bottom: 35px">
                    <div class="form-group" style="text-align: center;font-size: 16px;font-weight: bold">
                        <span class="col-sm-12 ">我已进入机场</span>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机号：</label>
                            <div class="col-sm-9">
                                <input type="text" name="sjhm" class="form-control" placeholder="请输入手机号码">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">进入机场时间：</label>
                            <div class="col-sm-9">
                                <div class="input-group date">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                    <input type="text" name="lkzs" class="form-control" id="laydate-demo-4" placeholder="yyyy-MM-dd HH:mm:ss">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <div class="col-sm-12 " style="text-align: center;">
                                <button disabled type="button" onclick="jcsubmitHandler()" class="btn btn-primary">提交</button>
                                <button disabled onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
                            </div>
                        </div>
                    </div>

                </form>
            </div>
        </div>
        <div id="tab4" class="weui-tab__bd-item">

            <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
                <form class="form-horizontal m" id="form-lwsq-chaxun" style="padding-bottom: 35px">
                    <div class="form-group" style="text-align: center;font-size: 16px;font-weight: bold">
                        <span class="col-sm-12 ">个人信息查询</span>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机号：</label>
                            <div class="col-sm-9">
                                <input type="text" name="sjhm" class="form-control" placeholder="请输入手机号码">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <div class="col-sm-12 " style="text-align: center;">
                                <button disabled type="button" onclick="jcsubmitHandler()" class="btn btn-primary">查询</button>
                                <button disabled onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
                            </div>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>

    <div class="weui-tabbar">
        <a href="#tab1" class="weui-tabbar__item weui-bar__item--on">
            <div class="weui-tabbar__icon">
                <img src="../weiui/images/icon_nav_msg.png" alt="">
            </div>
            <p class="weui-tabbar__label">离乌申请</p>
        </a>
        <a href="#tab2" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img src="./weiui/images/icon_nav_button.png" alt="">
            </div>
            <p class="weui-tabbar__label">离开住所</p>
        </a>
        <a href="#tab3" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img src="./weiui/images/icon_nav_article.png" alt="">
            </div>
            <p class="weui-tabbar__label">进入机场</p>
        </a>
        <a href="#tab4" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img src="./weiui/images/icon_nav_cell.png" alt="">
            </div>
            <p class="weui-tabbar__label">查询</p>
        </a>
    </div>
</div>

<script src="../static/weiui/lib/jquery-2.1.4.js" th:src="@{/weiui/lib/jquery-2.1.4.js}"></script>
<script src="../static/weiui/lib/fastclick.js" th:src="@{/weiui/lib/fastclick.js}"></script>
<script src="../static/weiui/js/jquery-weui.js" th:src="@{/weiui/js/jquery-weui.js}"></script>


<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: jquery-cxselect-js" />

<script th:inline="javascript">
    var prefix = ctx + "api/lwsq/lwsq"
    $("#form-lwsq-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {

          $("#sqName").val($("#province").find("option:selected").text()+"-"+$("#citys").find("option:selected").text())

            $.operate.save(prefix + "/add", $('#form-lwsq-add').serialize());
            $.modal.alertSuccess('提交成功！')
        }

    }

    function lksubmitHandler() {
            $.operate.save(prefix + "/edit", $('#form-lwsq-likai').serialize());
            $.modal.alertSuccess('提交成功！')
    }

    function jcsubmitHandler() {
        $.operate.save(prefix + "/edit", $('#form-lwsq-jichang').serialize());
        $.modal.alertSuccess('提交成功！')
    }

    $("input[name='shclsj']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='rwrq']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='yqlwrq']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='jcbgRq']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='hsjcRq']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='skjcRq']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    layui.use('laydate', function() {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#laydate-demo-3',
            type: 'datetime',
            trigger: 'click'
        });
        laydate.render({
            elem: '#laydate-demo-4',
            type: 'datetime',
            trigger: 'click'
        });
    });

    // 通过默认url获取
    // var urlChina = prefix+'/cityData';
    // $.cxSelect.defaults.url = urlChina;
    // $('#element1').cxSelect({
    //     selects: ['province', 'city', 'area'],
    //     nodata: 'none',
    //     jsonValue: 'code'
    // });


    //onChange事件：是当选择项发生改变时自动触发.
    //定义省份关联的城市
    var province=["达坂城区","米东区","沙依巴克区","水磨沟区","天山区","头屯河区","乌鲁木齐县","新市区"];
    province["达坂城区"] = ["阿克苏乡","艾维尔沟街道","柴窝堡管委会达坂城盐湖街道","达坂城镇","东沟乡","乌拉泊街道","西沟乡"];
    province["米东区"] = ["柏杨河乡","长山子镇","地磅街道","古牧地东路街道","古牧地西路街道","古牧地镇","卡子湾街道","芦草沟乡","南路街道","三道坝镇","石化街道","铁厂沟镇","羊毛工镇"];
    province["沙依巴克区"] = ["八一街道","镔铁农十二师一零四团","兵团十二师西山农场","仓房沟片区街道","长江路街道","长胜东街道","长胜南街道","长胜西街道","和田街街道","红庙子街道","火车南站街道","炉院街街道","西山街道","雅玛里克山街道","扬子江路街道","友好北路街道","友好南路街道"];
    province["水磨沟区"] = ["八道湾街道","六道湾街道","南湖北路街道","南湖南路街道","七道湾街道","水磨沟街道","水磨沟区农村事务管理办公室","苇湖梁街道","新民路街道"];
    province["天山区"] = ["大湾街道","东门街道","二道桥街道","和平路街道","黑甲山街道","红雁街道","碱泉街道","解放北路街道","解放南路街道","青年路街道","赛马场街道","胜利路街道","团结路街道","新华北路街道","新华南路街道","幸福路街道","延安路街道","燕儿窝街道"];
    province["头屯河区"] = ["北站西路街道","兵团十二师三坪农场","兵团十二师五一农场","火车西站街道","头屯河街道","头屯河区乡类似乡镇单位","王家沟街道","乌昌路街道","新疆兵团十二师头屯河农场"];
    province["乌鲁木齐县"] = ["板房沟镇","甘沟乡","萨尔达坂乡","水西沟镇","托里乡","永丰镇"];
    province["新市区"] = ["北京路街道","北站东路街道","长春中路街道","地窝堡乡","二宫街道","二宫乡","高新街街道","杭州路街道","喀什东路街道","南纬路街道","萨尔达坂乡","三宫街道","石油新村街道","天津路街道","乌鲁木齐经济开发区街道","银川路街道","迎宾路街道"];
    //当改变省份时在citys下拉框中出现对应的城市
    function changeProvince(v){
        //1.得到当前选择省份对应的城市数组
        var cityArr = province[v];
        //2.将上面的数组的内容存放到citys下拉框中
        //循环前先清空citys列表框中的内容
        lib.D("citys").options.length = 0;
        for(var index in cityArr){
            //2.1)构造一个Option对象
            //参数1：代表option控件中的text属性，
            //参数2：代表option控件中的value属性（提交到服务器上的值）
            var option = new Option(cityArr[index],index);
            //2.2)将上面的option对象放到citys控件的options集合中
            lib.D("citys").options.add(option);
        }
    }
    var nations = ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族", "布依族", "朝鲜族", "满族", "侗族", "瑶族", "白族",
        "土家族", "哈尼族", "哈萨克族", "傣族", "黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族", "景颇族", "柯尔克孜族", "土族",
        "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族", "毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族", "俄罗斯族", "鄂温克族",
        "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族", "鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"];
    var option = "";
    for(var i = 0; i <
    nations.length; i++) {
        option += '<option value="' + (i + 1) + '">' + nations[i] + '</option>';
    }
    $(option).appendTo("#nation");
</script>
<script src="../static/js/gwh_sq_data.js" th:src="@{/js/gwh_sq_data.js}"></script>
<script src="../static/js/myLib.js" th:src="@{/js/myLib.js}"></script>
</body>
</html>
